//////////////////////////////////////////////////////////////////
// (c) Copyright 2003  by Jeongnim Kim
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
//   National Center for Supercomputing Applications &
//   Materials Computation Center
//   University of Illinois, Urbana-Champaign
//   Urbana, IL 61801
//   e-mail: jnkim@ncsa.uiuc.edu
//   Tel:    217-244-6319 (NCSA) 217-333-3324 (MCC)
//
// Supported by 
//   National Center for Supercomputing Applications, UIUC
//   Materials Computation Center, UIUC
//////////////////////////////////////////////////////////////////
// -*- C++ -*-

#ifndef OHMMS_OHMMSDATA_H
#define OHMMS_OHMMSDATA_H

/*!\class OhmmsData
 * \brief Combination of Composite and Singleton partterns.
 * 
 * staitc member data and member functions are used to ensure that
 * only one instance (singleton pattern) exisits per application, 
 * i.e., executable.
 */
#include <map>
#include <string>
#include <iostream>
#include "OhmmsData/OhmmsElementBase.h"

struct OhmmsData {

  typedef std::map<int,OhmmsElementBase*> OhmmsDataMap_t;

  static OhmmsDataMap_t Members;

  static void Add(int i, OhmmsElementBase* o);

  static bool put(const std::string& s);

  static bool find(int i);

  static bool writeToStream(std::ostream& );

  static bool writeForNextRun(xmlDocPtr doc);

};

#endif
/***************************************************************************
 * $RCSfile: OhmmsData.h,v $   $Author: jnkim $
 * $Revision: 1.1.1.1 $   $Date: 2004/07/23 21:04:03 $
 * $Id: OhmmsData.h,v 1.1.1.1 2004/07/23 21:04:03 jnkim Exp $ 
 ***************************************************************************/
